package edu.usc.trials;

import java.util.ArrayList;

import edu.usc.utils.FileUtils;

public class TrialTagSentence {

	public static String fileURL = "C:\\Ramesh\\works\\projects\\java_ws\\StorySummerizer\\8";
	public static String template = "C:\\Ramesh\\works\\projects\\java_ws\\StorySummerizer\\sentencesSplit_8\\";
	public static int i = 0;
	public static void main(String[] args) {

		ArrayList<String> files = 
				FileUtils.listAllFilesInDirectory(fileURL);
		
		for(String url: files) {
			i++;
			if(url.contains(".txt")) {
				String story = FileUtils.contentsOfTheFile(url);
				String[] sentences = story.split("[.?!] ");
				for(String sentence: sentences) {
					FileUtils.writeToFileAlreadyExisting(template+i, sentence.trim());
					FileUtils.writeToFileAlreadyExisting(template+"main", url + "\t" +sentence.trim());
				}
			}
		}
	}

}
